<template lang="html">
  <div class="">
    {{data}}
  </div>
</template>

<script>
import axios from 'axios';
export default {
  data () {
    return {
      data: []
    };
  },
  methods: {
    initIDCardRead () {
      axios({
        url: 'http://127.0.0.1:8016/service/IDCardReader',
        method: 'post'
      }).then(res => {
        console.log(res);
        this.data.push(res.data);
        this.initIDCardRead();
      }).catch(err => {
        console.log(err);
        this.initIDCardRead();
      });
    }
  },
  mounted () {
    this.initIDCardRead();
  }
};
</script>

<style lang="css">
</style>
